package com.media.themovieworld.util.dialog;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.view.Gravity;
import android.widget.TextView;

public class DialogUtil {

	public static void showConfirmDialog(final Context context, String title,String message) {
		AlertDialog.Builder builder = new AlertDialog.Builder(context);
		TextView mtitle = new TextView(context);
		mtitle.setText(title);
		mtitle.setGravity(Gravity.CENTER);
		mtitle.setTextSize(22);
		builder.setCustomTitle(mtitle);
		builder.setMessage(message);
		builder.setPositiveButton("OK", new OnClickListener() {
			
			@Override
			public void onClick(DialogInterface dialog, int which) {
				dialog.dismiss();
			}
		});
		AlertDialog dialog = builder.show();
		TextView messageText = (TextView)dialog.findViewById(android.R.id.message);
		messageText.setGravity(Gravity.CENTER);
		dialog.show();
	}
}
